load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")

package(default_visibility = ["//visibility:public"])

DEPENDENCIES = [
    # Keep sorted.
    "//rs/crypto/internal/crypto_lib/bls12_381/type",
    "//rs/crypto/internal/crypto_lib/types",
    "//rs/crypto/temp_crypto",
    "//rs/interfaces",
    "//rs/interfaces/registry",
    "//rs/monitoring/logger",
    "//rs/protobuf",
    "//rs/registry/fake",
    "//rs/registry/helpers",
    "//rs/registry/keys",
    "//rs/registry/proto_data_provider",
    "//rs/test_utilities/in_memory_logger",
    "//rs/types/types",
    "@crate_index//:hex",
    "@crate_index//:rand",
    "@crate_index//:rand_chacha",
    "@crate_index//:serde",
    "@crate_index//:serde_cbor",
]

MACRO_DEPENDENCIES = []

DEV_DEPENDENCIES = [
    # Keep sorted.
    "//rs/crypto/test_utils",
    "//rs/crypto/test_utils/reproducible_rng",
    "//rs/types/types_test_utils",
]

MACRO_DEV_DEPENDENCIES = []

ALIASES = {}

rust_library(
    name = "ni-dkg",
    testonly = True,
    srcs = glob(["src/**/*.rs"]),
    aliases = ALIASES,
    crate_name = "ic_crypto_test_utils_ni_dkg",
    proc_macro_deps = MACRO_DEPENDENCIES,
    deps = DEPENDENCIES,
)

rust_test(
    name = "ni-dkg_test",
    aliases = ALIASES,
    crate = ":ni-dkg",
    proc_macro_deps = MACRO_DEPENDENCIES + MACRO_DEV_DEPENDENCIES,
    deps = DEPENDENCIES + DEV_DEPENDENCIES,
)
